<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>我的社区</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		
		<link rel="stylesheet" href="../css/mui.min.css">
		<script src="../js/flexible.js" type="text/javascript" charset="utf-8"></script>
		<style>
			html,
			body {
				background-color: #f6f6f6;min-height: 100vh;font-size: 0.373rem;
			}
			ul, ol { list-style:none; } 
			body input[type='text'],ul,li{padding: 0;margin: 0;}
			.clear{clear:both;height:0;font-size:0;line-height:0;visibility:hidden; overflow:hidden;}
			/*顶部*/
 			.my_shequ{
 				display: flex;background: #FFFFFF;    margin-top: 0.253rem;justify-content: space-between;padding: 0 0.373rem;line-height: 1.32rem;height: 1.32rem;
 			}
 			.my_shequ_content{
 				background-color: #f6f6f6;
 			}
 			.my_shequ h3{
 				font-size: 0.373rem;line-height: 1.32rem;height: 1.32rem;margin: 0;
 			}
 			.my_shequ_right{
 				display: flex;
 				justify-content: center;
 				align-items: center;
 			}
 			.my_shequ_right i{
 				background: url(../images/my_01.png) no-repeat;
			    background-size: 100% 100%;
			    height: 0.306rem;
			    width: 0.186rem;
			    margin-left: 0.3rem;
 			}
 			.my_shequ_right span{
 				color: #888888;
 			}
 			.my_shequ_right a{
 				display: flex;
 				align-items: center;
 			}
 			/*行内样式*/
 			.mui-btn{width: 92%;margin: 0 auto;display: block;height: 1.32rem;margin-top: 0.253rem;font-size: 0.48rem;}
		</style>
	</head>


	<body>
		<!--顶部-->
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">我的社区</h1>
		</header>
		<div class="my_shequ_content mui-content" id="app">	
			<div class="mu_login-all">
				<a href="select_bdarea.html">
	 			<sdiv class="my_shequ">
	 				<h3 style="color: #353535;" id="name"></h3>
	 				<div class="my_shequ_right">
	 					<span>更换</span>
	 					<i></i>
	 				</div>
	 			</div>
	 			</a>
 			</div>
	 		<button type="button" class="mui-btn mui-btn-danger">解绑社区</button>
		</div>
	</body>

</html>
<script src="../js/mui.min.js"></script>
<script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/js.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	var user = Storage.get('user');
	var address = Storage.get('address');
	mui('body').on('tap','.mui-btn',function(){
		mui.post(url + "app/system/unlockCommunity", {
			uid:user.uid,
			sqid:address.sqid,
			account_type: user.account_type
		}, function(data) {
			var json = JSON.parse(data);
			console.log(json)
			if (json.code == 1) {
				mui.toast('解绑成功',{ duration:'long', type:'div' })
				document.getElementById('name').innerHTML = '暂无绑定社区'
			} else{
				mui.toast('该用户还未绑定社区',{ duration:'long', type:'div' })
			}
		});
	});
	
	
	
	
	mui('.mui-content').on('tap','a',function(){
		mui.openWindow({
			url:this.href,
			id:this.href,
			creatNew:true,
		})
	})
	mui.post(url + "app/user/get_uid", {uid:user.uid}, function(data) {
		var json = JSON.parse(data);
		console.log(json)
		if (json.code == 0) {
			document.getElementById('name').innerHTML = '暂无绑定社区'
		} else{
			document.getElementById('name').innerHTML = json.data.name
		}
	});
	
</script>

